ref(android): Remove unused lock from SentryPerformanceProvider - #5871
Merged
runningcode merged 2 commits intoJul 30, 2026
Conversation
The field was added in #3715 to guard onAppStartDone(), its only user. That method was removed in the 8.x.x merge (#4033), leaving the lock orphaned — it has been allocated on every cold start since, in ContentProvider.onCreate, without ever being acquired. The ISentryLifecycleToken import stays: it is still used for AppStartMetrics.staticLock in shutdown(). Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
📲 Install BuildsAndroid
|
Contributor
Performance metrics 🚀
|
| Revision | Plain | With Sentry | Diff |
|---|---|---|---|
| 6b019b7 | 343.31 ms | 417.23 ms | 73.91 ms |
| d15471f | 342.08 ms | 415.44 ms | 73.35 ms |
| 8687935 | 332.52 ms | 362.23 ms | 29.71 ms |
| 5b1a06b | 352.27 ms | 413.70 ms | 61.43 ms |
| 91bb874 | 314.47 ms | 440.00 ms | 125.53 ms |
| 0ee65e9 | 321.06 ms | 361.24 ms | 40.18 ms |
| e63ad34 | 323.67 ms | 390.33 ms | 66.67 ms |
| 33a08cc | 267.08 ms | 340.45 ms | 73.37 ms |
| 27d7cf8 | 397.90 ms | 498.65 ms | 100.75 ms |
| ee747ae | 405.43 ms | 485.70 ms | 80.28 ms |
App size
| Revision | Plain | With Sentry | Diff |
|---|---|---|---|
| 6b019b7 | 0 B | 0 B | 0 B |
| d15471f | 1.58 MiB | 2.13 MiB | 559.54 KiB |
| 8687935 | 1.58 MiB | 2.19 MiB | 619.17 KiB |
| 5b1a06b | 0 B | 0 B | 0 B |
| 91bb874 | 1.58 MiB | 2.13 MiB | 559.07 KiB |
| 0ee65e9 | 0 B | 0 B | 0 B |
| e63ad34 | 0 B | 0 B | 0 B |
| 33a08cc | 1.58 MiB | 2.12 MiB | 555.28 KiB |
| 27d7cf8 | 1.58 MiB | 2.12 MiB | 549.42 KiB |
| ee747ae | 1.58 MiB | 2.10 MiB | 530.95 KiB |
runningcode
marked this pull request as ready for review
July 30, 2026 08:47
runningcode
requested review from
0xadam-brown,
adinauer,
markushi and
romtsn
as code owners
July 30, 2026 08:47
runningcode
enabled auto-merge (squash)
July 30, 2026 08:49
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
📜 Description
Removes the unused
AutoClosableReentrantLockfield fromSentryPerformanceProvider, and its now-unneeded import.The field was declared but never acquired. History:
synchronizedwithReentrantLock#3715 ("ReplacesynchronizedwithReentrantLock") to guardonAppStartDone(), which was its only user.onAppStartDone()was removed in Mergemaininto8.x.xwith 7.20.0 being latest release #4033 (themain→8.x.xmerge), leaving the lock orphaned.💡 Motivation and Context
Delete dead code
💚 How did you test it?
it compiles
📝 Checklist
sendDefaultPIIis enabled.Notes on the checklist: no new tests were added — this removes dead code with no behavior to test, and the existing suite covers the class. A changelog entry is added under
### Performance.🔮 Next steps
None.